<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath() + "/";
%>

<!DOCTYPE html>
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title>Login</title>
    <link href="<%=path%>sys/css/styles.css" type="text/css" media="screen" rel="stylesheet" />
    <link href="<%=path%>sys/css/jquery-ui-1.8.16.custom.css" rel="stylesheet">
    <script src="<%=path%>sys/js/jquery-1.6.2.min.js"></script>
    <script src="<%=path%>sys/js/jquery-ui-1.8.16.custom.min.js"></script>
    <script type="text/javascript" src="<%=path%>sys/js/jquery.keyboard.extension-typing.js"></script>
    <link type="text/css" href="<%=path%>sys/css/keyboard.css" rel="stylesheet" />
    <script type="text/javascript" src="<%=path%>sys/js/jquery.keyboard.js"></script>
</head>
<body id="login">
    <div id="wrappertop">
    </div>
    <div id="wrapper">
        <div id="content">
            <div id="header">
                <h1>
                    <a href="">
                      <!-- <img src="<%=path%>sys/images/logo.png" height="50" width="100" alt="logo"> -->
                   </a>
               </h1>
            </div>
            <div id="darkbanner" class="banner320">
                <h2>荥阳机械配件外贸项目</h2>
            </div>
            <div id="darkbannerwrap">
            </div>
            <form name="form1" method="post" action="">
            <fieldset class="form">
                <p>
                    <label class="loginlabel" for="user_name"> 用户名:</label>
                    <input class="logininput ui-keyboard-input ui-widget-content ui-corner-all" name="user_name"
                        id="user_name" type="text" value="" />
                </p>
                <p>
                    <label class="loginlabel" for="user_password"> 密码:</label>
                    <span>
                        <input class="logininput"   name="user_password" id="user_password" type="password" />
                        <img id="passwd" class="tooltip" alt="点击打开虚拟键盘~" title="点击打开虚拟键盘~"
                            src="<%=path%>sys/images/keyboard.png" />
                    </span>
                </p>
                <button id="loginbtn" type="button" class="positive" name="Submit">
                    <img src="<%=path%>sys/images/key.png" alt="Announcement" />登录</button>
                <ul id="forgottenpassword">
                    <li class="boldtext">|</li>
                    <li>
                        <input id="remember" type="checkbox" name="remember" id="rememberMe">
                        <label for="rememberMe">记录用户</label>
                    </li>
                </ul>
            </fieldset>
            </form>
        </div>
    </div>
    <div id="wrapperbottom_branding">
    </div>
    <script type="text/javascript">
        $(document).ready(function() {
            $('#user_password').keyboard({
                openOn: null,
                stayOpen: true,
                layout: 'qwerty'
            }).addTyping();
            $('#passwd').click(function() {
                $('#user_password').getkeyboard().reveal();
            })

            $(".logininput").blur(function() {
                if ($(this).val() == "") {
                    $(this).css("border-color", "red");
                                    }
                else
                    $(this).css("border-color", "#D9D6C4");
            })

            $("#loginbtn").click(function() {
                var k = 0;
                var ajaxhtml = "";
                $(".logininput").each(function(i, obj) {
                    if ($(obj).val().trim() == "") {
                        k++;
                        $(this).css("border-color", "red");
                        $(this).focus();
                        return false;
                    }
                });
                if (k != 0) return;
                window.location.href='<%=path%>sys/jsp/main.jsp';
            })
        });
        
    </script>
</body>